

<div class="container-fluid">
<h1>RISM SRU/SRW for Persons</h1>
<br>
    <%= form_for "sru", :html => {:class => "form-inline"} do |m| %>          
          <%= m.text_field :name, :class=>"search", :value=>@name %>
          <%= hidden_field_tag :start, 1 %>
          <%= m.submit :value=> "Search", :class => "btn", :title=>"Supported indexes: id, author (default), occupation, gender, country. 
Example:  author=Moz* and gender=w." %>
             
    <% end %>

<br>
 <%# @para %>
 <%# @start %>

<div class="row-fluid">
<div class="span8">
 
  <% if @count.present? %>
 <%= @count %> records found.
 <% end %> 
<br>
<br>

 <%if @name%>
 <% if @res.present? %>
 <%if @count.to_s.to_i>0 %> 

<%= raw @res %>
</div>
<%= render "facet" %>


 </div>
<% end %> 
<%end%>
<%end%>
<p>

<% if @start %>
<%if @count.to_s.to_i>0 %>
<%= link_to "1", :controller => 'person',
:action => "sru", :sru => {:name => @name}, :start => 1 %>

<% (1..@count.to_s.to_i/20).each do |i| %>
<%= link_to i+1, :controller => 'person',
:action => "sru", :sru => {:name => @name}, :start => i*20+1 %>

<%end%>
<%end%>
<%end%>

</p>
<br><br>

</div>
